All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface quicktime.util.EncodedImage

public interface EncodedImage
Objects that implement the encoded image interface implement a particular format for storing encoded image data. This allows images to be kept in a format that is appropriate for a particular usage but simplifies the APIs that use encoded image data. This interface can ony be implemented by classes that are a part of the QTJava library; applications are not able to extend or apply usage of this interface, but can use the image encoding options that are provided.

To use objects that implement this interface you use the instanceof operator. The library ships with three types of objects that implement this interface.

The EncodedImage class contains no information about the encoding format of the image. The particular encoding format of the image data is described by the encoded image's accompanying ImageDescription object, which contains all of the metadata that is required to completely describe the format and characteristics of the encoded image data.

If you are looking at pixel values directly you should bear a couple of things in mind:
you may need to deal with the endian issue - they will be in a native endian format.
if the description describes the image data format to be something other than raw pixels then the get methods are probably not very useful as you will not be looking at pixel values.

See Also:
ImageDescription, ByteEncodedImage, IntEncodedImage, RawEncodedImage

Variable Index

 o kRowBytesUnknown
This value is returned by an EncodedImage class from the getRowBytes() method if the encoded image does not know how many bytes per row or the data does not contain any extra byte data beyond the image encoding

Method Index

 o getByte(int)
Returns the byte at the specified offset.
 o getInt(int)
Returns the int at the specified offset.
 o getRowBytes()
Returns either kRowBytesUnknown or the number of bytes per row that the encoded image data is comprised of.
 o getShort(int)
Returns the short at the specified offset.
 o getSize()
Returns the size in bytes of the EncodedImage data.

Variables

 o kRowBytesUnknown
 public static final int kRowBytesUnknown
This value is returned by an EncodedImage class from the getRowBytes() method if the encoded image does not know how many bytes per row or the data does not contain any extra byte data beyond the image encoding

Methods

 o getSize
 public abstract int getSize()
Returns the size in bytes of the EncodedImage data. The offset is specified in bytes into the encoded image object.

 o getByte
 public abstract byte getByte(int offset)
Returns the byte at the specified offset. The offset is specified in bytes into the encoded image object.

 o getShort
 public abstract short getShort(int offset)
Returns the short at the specified offset. The offset is specified in bytes into the encoded image object.

 o getInt
 public abstract int getInt(int offset)
Returns the int at the specified offset. The offset is specified in bytes into the encoded image object.

 o getRowBytes
 public abstract int getRowBytes()
Returns either kRowBytesUnknown or the number of bytes per row that the encoded image data is comprised of. This number will at least be as big as width*pixelSize, and maybe larger.


All Packages  Class Hierarchy  This Package  Previous  Next  Index